<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script type="text/javascript" src="__PUBLIC__/js/ymPrompt/ymPrompt.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>

<link href="__ROOT__/public/theme_default/layout.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" id='skin' type="text/css" href="__PUBLIC__/js/ymPrompt/skin/qq/ymPrompt.css" />

<script>
	function addsubmit() {
		$.ajax({
 			type: "POST",
 			url: "__APP__/Group/joingroup",
 			data:   "addsubmit=1&gid={$gid}&reason="+$('#reason').val(),
 			success: function(msg){
 				$('#pop1').hide();
 				$('#pop2').show();
 			}
		});
	}
</script>
<php>if(!$mid){</php>
<div class="pop">
  <div class="con">
	<table width="100%" border="0" cellspacing="3" cellpadding="0" class="mt10">
  <tr>
    <td align="center" valign="top"><img src="__ROOT__/thumb.php?w=80&h=80&url={$groupinfo['logo']|get_photo_url}" width="50" height="50" /></td>
    <td>
		你还没有登陆，不能加入！
      </td>
  </tr>
  <tr>
  	<td valign="top">&nbsp;</td>
  	<td><input name="input" type="button" class="btn_b" value="确 定" onclick="javascript:parent.ymPrompt.close();"/></td>
  	</tr>
	</table>

  </div>

</div>

<php>} elseif($joinCount == $config['joinMaxGroup'] && $config['joinMaxGroup']){</php>

<div class="pop" id="pop">
  <div class="con">
	<table width="100%" border="0" cellspacing="3" cellpadding="0" class="mt10">
  <tr>
    <td align="center" valign="top"><img src="__ROOT__/thumb.php?w=80&h=80&url={$groupinfo['logo']|get_photo_url}" width="50" height="50" /></td>
    <td>
		你加入的群太多了！！不可以再加入了！！
      </td>
  </tr>
  <tr>
  	<td valign="top">&nbsp;</td>
  	<td><input name="input" type="button" class="btn_b" value="确 定" onclick="javascript:parent.ymPrompt.close();"/></td>
  	</tr>
	</table>

  </div>

</div>


<php>} elseif($isjoin){ </php>
	<br/>
	<br/>
	<h3>你已经加入过！！！ </h3><br/><input name="input" type="button" class="btn_b" value="确 定" onclick="javascript:parent.ymPrompt.close();"/>

<php>} else{ </php>
	<div class="pop" id="pop1">
  <div class="con">
	<table width="100%" border="0" cellspacing="2" cellpadding="0" class="mt10">
    <eq name="groupinfo['need_verify']" value="1">
	 <tr>
	<td align="center" valign="top"><img src="__ROOT__/thumb.php?w=50&h=50&url={$groupinfo['logo']|get_photo_url}"  /></td>
    <td>需通过该群管理员的审核才能加入该群<br/>
      申请加入理由：<br />
          <textarea name="textarea" class="Text" cols="" name="reason" id="reason" rows="" style="width:100%; height:50px;"></textarea>
    </td>
	  </tr>
	    <tr>
  	<td valign="top">&nbsp;</td>
  	<td><input name="input" type="button" class="btn_b" value="确 定" onclick="addsubmit();"/>
          <input name="input2" type="button" class="btn_w" value="取 消" onclick="javascript:parent.ymPrompt.close();"/></td>
  	</tr>
    <else />
	<tr>
    <td height="60" colspan="2" align="center">你确定要加入{$groupinfo.name}吗？</td>
	 </tr>
  <tr>
  	<td colspan="2" align="center" valign="top"><input name="input" type="button" class="btn_b" value="确 定" onclick="addsubmit();"/>
  		 <input name="input2" type="button" class="btn_w" value="取 消" onclick="javascript:parent.ymPrompt.close();"/></td>
  	</tr>
	</eq>
	</table>

  </div>
</div>
<php>} </php>


<div class="pop" id="pop2" style="display:none">
  <div class="con">
	<table width="100%" border="0" cellspacing="2" cellpadding="0">
  <tr>
    <td valign="top"><img src="__ROOT__/thumb.php?w=80&h=80&url={$groupinfo['logo']|get_photo_url}" width="50" height="50" /></td>
    <td>
		你已经加入{$groupinfo.name}成功 <eq name="groupinfo['need_verify']" value="1">，等待审核</eq>
      </td>
  </tr>
</table>

  </div>
  <div class="btm">
          <input name="input" type="button" class="btn_b" value="确 定" onclick="javascript:url=parent.location.href; parent.window.location.href=url;parent.ymPrompt.close();"/>
  </div>
</div>
